3.211 \(\int \frac{\sec (e+f x) (c+d \sec (e+f x))^3}{a+a \sec (e+f x)} \, dx\)

Optimal. Leaf size=117 \[ \frac{3 d \left (2 c^2-2 c d+d^2\right ) \tanh ^{-1}(\sin (e+f x))}{2 a f}-\frac{d \tan (e+f x) \left (4 \left (c^2-3 c d+d^2\right )+d (2 c-3 d) \sec (e+f x)\right )}{2 a f}+\frac{(c-d) \tan (e+f x) (c+d \sec (e+f x))^2}{f (a \sec (e+f x)+a)} \]

[Out]

(3*d*(2*c^2 - 2*c*d + d^2)*ArcTanh[Sin[e + f*x]])/(2*a*f) + ((c - d)*(c + d*Sec[e + f*x])^2*Tan[e + f*x])/(f*(
a + a*Sec[e + f*x])) - (d*(4*(c^2 - 3*c*d + d^2) + (2*c - 3*d)*d*Sec[e + f*x])*Tan[e + f*x])/(2*a*f)

________________________________________________________________________________________

Rubi [A]  time = 0.253739, antiderivative size = 171, normalized size of antiderivative = 1.46, number of steps used = 6, number of rules used = 6, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.194, Rules used = {3987, 98, 147, 63, 217, 203} \[ \frac{3 d \left (2 c^2-2 c d+d^2\right ) \tan (e+f x) \tan ^{-1}\left (\frac{\sqrt{a-a \sec (e+f x)}}{\sqrt{a (\sec (e+f x)+1)}}\right )}{f \sqrt{a-a \sec (e+f x)} \sqrt{a \sec (e+f x)+a}}-\frac{d \tan (e+f x) \left (4 \left (c^2-3 c d+d^2\right )+d (2 c-3 d) \sec (e+f x)\right )}{2 a f}+\frac{(c-d) \tan (e+f x) (c+d \sec (e+f x))^2}{f (a \sec (e+f x)+a)} \]

Antiderivative was successfully verified.

[In]

Int[(Sec[e + f*x]*(c + d*Sec[e + f*x])^3)/(a + a*Sec[e + f*x]),x]

[Out]

(3*d*(2*c^2 - 2*c*d + d^2)*ArcTan[Sqrt[a - a*Sec[e + f*x]]/Sqrt[a*(1 + Sec[e + f*x])]]*Tan[e + f*x])/(f*Sqrt[a
 - a*Sec[e + f*x]]*Sqrt[a + a*Sec[e + f*x]]) + ((c - d)*(c + d*Sec[e + f*x])^2*Tan[e + f*x])/(f*(a + a*Sec[e +
 f*x])) - (d*(4*(c^2 - 3*c*d + d^2) + (2*c - 3*d)*d*Sec[e + f*x])*Tan[e + f*x])/(2*a*f)

Rule 3987

Int[(csc[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]
*(d_.) + (c_))^(n_), x_Symbol] :> Dist[(a^2*g*Cot[e + f*x])/(f*Sqrt[a + b*Csc[e + f*x]]*Sqrt[a - b*Csc[e + f*x
]]), Subst[Int[((g*x)^(p - 1)*(a + b*x)^(m - 1/2)*(c + d*x)^n)/Sqrt[a - b*x], x], x, Csc[e + f*x]], x] /; Free
Q[{a, b, c, d, e, f, g, m, n, p}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && (EqQ[p,
 1] || IntegerQ[m - 1/2])

Rule 98

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[((b*c -
 a*d)*(a + b*x)^(m + 1)*(c + d*x)^(n - 1)*(e + f*x)^(p + 1))/(b*(b*e - a*f)*(m + 1)), x] + Dist[1/(b*(b*e - a*
f)*(m + 1)), Int[(a + b*x)^(m + 1)*(c + d*x)^(n - 2)*(e + f*x)^p*Simp[a*d*(d*e*(n - 1) + c*f*(p + 1)) + b*c*(d
*e*(m - n + 2) - c*f*(m + p + 2)) + d*(a*d*f*(n + p) + b*(d*e*(m + 1) - c*f*(m + n + p + 1)))*x, x], x], x] /;
 FreeQ[{a, b, c, d, e, f, p}, x] && LtQ[m, -1] && GtQ[n, 1] && (IntegersQ[2*m, 2*n, 2*p] || IntegersQ[m, n + p
] || IntegersQ[p, m + n])

Rule 147

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_) + (f_.)*(x_))*((g_.) + (h_.)*(x_)), x_Symbol]
:> -Simp[((a*d*f*h*(n + 2) + b*c*f*h*(m + 2) - b*d*(f*g + e*h)*(m + n + 3) - b*d*f*h*(m + n + 2)*x)*(a + b*x)^
(m + 1)*(c + d*x)^(n + 1))/(b^2*d^2*(m + n + 2)*(m + n + 3)), x] + Dist[(a^2*d^2*f*h*(n + 1)*(n + 2) + a*b*d*(
n + 1)*(2*c*f*h*(m + 1) - d*(f*g + e*h)*(m + n + 3)) + b^2*(c^2*f*h*(m + 1)*(m + 2) - c*d*(f*g + e*h)*(m + 1)*
(m + n + 3) + d^2*e*g*(m + n + 2)*(m + n + 3)))/(b^2*d^2*(m + n + 2)*(m + n + 3)), Int[(a + b*x)^m*(c + d*x)^n
, x], x] /; FreeQ[{a, b, c, d, e, f, g, h, m, n}, x] && NeQ[m + n + 2, 0] && NeQ[m + n + 3, 0]

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 217

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{\sec (e+f x) (c+d \sec (e+f x))^3}{a+a \sec (e+f x)} \, dx &=-\frac{\left (a^2 \tan (e+f x)\right ) \operatorname{Subst}\left (\int \frac{(c+d x)^3}{\sqrt{a-a x} (a+a x)^{3/2}} \, dx,x,\sec (e+f x)\right )}{f \sqrt{a-a \sec (e+f x)} \sqrt{a+a \sec (e+f x)}}\\ &=\frac{(c-d) (c+d \sec (e+f x))^2 \tan (e+f x)}{f (a+a \sec (e+f x))}+\frac{\tan (e+f x) \operatorname{Subst}\left (\int \frac{(c+d x) \left (-a^2 (3 c-2 d) d+a^2 (2 c-3 d) d x\right )}{\sqrt{a-a x} \sqrt{a+a x}} \, dx,x,\sec (e+f x)\right )}{a f \sqrt{a-a \sec (e+f x)} \sqrt{a+a \sec (e+f x)}}\\ &=\frac{(c-d) (c+d \sec (e+f x))^2 \tan (e+f x)}{f (a+a \sec (e+f x))}-\frac{d \left (4 \left (c^2-3 c d+d^2\right )+(2 c-3 d) d \sec (e+f x)\right ) \tan (e+f x)}{2 a f}-\frac{\left (3 a d \left (2 c^2-2 c d+d^2\right ) \tan (e+f x)\right ) \operatorname{Subst}\left (\int \frac{1}{\sqrt{a-a x} \sqrt{a+a x}} \, dx,x,\sec (e+f x)\right )}{2 f \sqrt{a-a \sec (e+f x)} \sqrt{a+a \sec (e+f x)}}\\ &=\frac{(c-d) (c+d \sec (e+f x))^2 \tan (e+f x)}{f (a+a \sec (e+f x))}-\frac{d \left (4 \left (c^2-3 c d+d^2\right )+(2 c-3 d) d \sec (e+f x)\right ) \tan (e+f x)}{2 a f}+\frac{\left (3 d \left (2 c^2-2 c d+d^2\right ) \tan (e+f x)\right ) \operatorname{Subst}\left (\int \frac{1}{\sqrt{2 a-x^2}} \, dx,x,\sqrt{a-a \sec (e+f x)}\right )}{f \sqrt{a-a \sec (e+f x)} \sqrt{a+a \sec (e+f x)}}\\ &=\frac{(c-d) (c+d \sec (e+f x))^2 \tan (e+f x)}{f (a+a \sec (e+f x))}-\frac{d \left (4 \left (c^2-3 c d+d^2\right )+(2 c-3 d) d \sec (e+f x)\right ) \tan (e+f x)}{2 a f}+\frac{\left (3 d \left (2 c^2-2 c d+d^2\right ) \tan (e+f x)\right ) \operatorname{Subst}\left (\int \frac{1}{1+x^2} \, dx,x,\frac{\sqrt{a-a \sec (e+f x)}}{\sqrt{a+a \sec (e+f x)}}\right )}{f \sqrt{a-a \sec (e+f x)} \sqrt{a+a \sec (e+f x)}}\\ &=\frac{3 d \left (2 c^2-2 c d+d^2\right ) \tan ^{-1}\left (\frac{\sqrt{a-a \sec (e+f x)}}{\sqrt{a+a \sec (e+f x)}}\right ) \tan (e+f x)}{f \sqrt{a-a \sec (e+f x)} \sqrt{a+a \sec (e+f x)}}+\frac{(c-d) (c+d \sec (e+f x))^2 \tan (e+f x)}{f (a+a \sec (e+f x))}-\frac{d \left (4 \left (c^2-3 c d+d^2\right )+(2 c-3 d) d \sec (e+f x)\right ) \tan (e+f x)}{2 a f}\\ \end{align*}

Mathematica [B]  time = 2.5219, size = 275, normalized size = 2.35 \[ \frac{\cos ^6\left (\frac{1}{2} (e+f x)\right ) \sec ^2(e+f x) \left (\left (\tan ^2\left (\frac{1}{2} (e+f x)\right )-1\right ) \left (-2 \left (-3 c^2 d+c^3+9 c d^2-3 d^3\right ) \tan \left (\frac{1}{2} (e+f x)\right )+3 d \left (2 c^2-2 c d+d^2\right ) \left (\log \left (\cos \left (\frac{1}{2} (e+f x)\right )-\sin \left (\frac{1}{2} (e+f x)\right )\right )-\log \left (\sin \left (\frac{1}{2} (e+f x)\right )+\cos \left (\frac{1}{2} (e+f x)\right )\right )\right )-3 d \left (2 c^2-2 c d+d^2\right ) \tan ^2\left (\frac{1}{2} (e+f x)\right ) \left (\log \left (\cos \left (\frac{1}{2} (e+f x)\right )-\sin \left (\frac{1}{2} (e+f x)\right )\right )-\log \left (\sin \left (\frac{1}{2} (e+f x)\right )+\cos \left (\frac{1}{2} (e+f x)\right )\right )\right )+2 (c-d)^3 \tan ^3\left (\frac{1}{2} (e+f x)\right )\right )+16 d^3 \sin ^4\left (\frac{1}{2} (e+f x)\right ) \csc ^3(e+f x)\right )}{a f (\cos (e+f x)+1)} \]

Antiderivative was successfully verified.

[In]

Integrate[(Sec[e + f*x]*(c + d*Sec[e + f*x])^3)/(a + a*Sec[e + f*x]),x]

[Out]

(Cos[(e + f*x)/2]^6*Sec[e + f*x]^2*(16*d^3*Csc[e + f*x]^3*Sin[(e + f*x)/2]^4 + (-1 + Tan[(e + f*x)/2]^2)*(3*d*
(2*c^2 - 2*c*d + d^2)*(Log[Cos[(e + f*x)/2] - Sin[(e + f*x)/2]] - Log[Cos[(e + f*x)/2] + Sin[(e + f*x)/2]]) -
2*(c^3 - 3*c^2*d + 9*c*d^2 - 3*d^3)*Tan[(e + f*x)/2] - 3*d*(2*c^2 - 2*c*d + d^2)*(Log[Cos[(e + f*x)/2] - Sin[(
e + f*x)/2]] - Log[Cos[(e + f*x)/2] + Sin[(e + f*x)/2]])*Tan[(e + f*x)/2]^2 + 2*(c - d)^3*Tan[(e + f*x)/2]^3))
)/(a*f*(1 + Cos[e + f*x]))

________________________________________________________________________________________

Maple [B]  time = 0.069, size = 371, normalized size = 3.2 \begin{align*}{\frac{{c}^{3}}{fa}\tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) }-3\,{\frac{\tan \left ( 1/2\,fx+e/2 \right ){c}^{2}d}{fa}}+3\,{\frac{\tan \left ( 1/2\,fx+e/2 \right ) c{d}^{2}}{fa}}-{\frac{{d}^{3}}{fa}\tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) }-{\frac{{d}^{3}}{2\,fa} \left ( \tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) +1 \right ) ^{-2}}+3\,{\frac{\ln \left ( \tan \left ( 1/2\,fx+e/2 \right ) +1 \right ){c}^{2}d}{fa}}-3\,{\frac{\ln \left ( \tan \left ( 1/2\,fx+e/2 \right ) +1 \right ) c{d}^{2}}{fa}}+{\frac{3\,{d}^{3}}{2\,fa}\ln \left ( \tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) +1 \right ) }-3\,{\frac{{d}^{2}c}{fa \left ( \tan \left ( 1/2\,fx+e/2 \right ) +1 \right ) }}+{\frac{3\,{d}^{3}}{2\,fa} \left ( \tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) +1 \right ) ^{-1}}+{\frac{{d}^{3}}{2\,fa} \left ( \tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) -1 \right ) ^{-2}}-3\,{\frac{\ln \left ( \tan \left ( 1/2\,fx+e/2 \right ) -1 \right ){c}^{2}d}{fa}}+3\,{\frac{\ln \left ( \tan \left ( 1/2\,fx+e/2 \right ) -1 \right ) c{d}^{2}}{fa}}-{\frac{3\,{d}^{3}}{2\,fa}\ln \left ( \tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) -1 \right ) }-3\,{\frac{{d}^{2}c}{fa \left ( \tan \left ( 1/2\,fx+e/2 \right ) -1 \right ) }}+{\frac{3\,{d}^{3}}{2\,fa} \left ( \tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) -1 \right ) ^{-1}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(f*x+e)*(c+d*sec(f*x+e))^3/(a+a*sec(f*x+e)),x)

[Out]

1/f*c^3/a*tan(1/2*f*x+1/2*e)-3/a/f*tan(1/2*f*x+1/2*e)*c^2*d+3/a/f*tan(1/2*f*x+1/2*e)*c*d^2-1/a/f*tan(1/2*f*x+1
/2*e)*d^3-1/2/a/f*d^3/(tan(1/2*f*x+1/2*e)+1)^2+3/a/f*ln(tan(1/2*f*x+1/2*e)+1)*c^2*d-3/a/f*ln(tan(1/2*f*x+1/2*e
)+1)*c*d^2+3/2/a/f*ln(tan(1/2*f*x+1/2*e)+1)*d^3-3/a/f*d^2/(tan(1/2*f*x+1/2*e)+1)*c+3/2/a/f*d^3/(tan(1/2*f*x+1/
2*e)+1)+1/2/a/f*d^3/(tan(1/2*f*x+1/2*e)-1)^2-3/a/f*ln(tan(1/2*f*x+1/2*e)-1)*c^2*d+3/a/f*ln(tan(1/2*f*x+1/2*e)-
1)*c*d^2-3/2/a/f*ln(tan(1/2*f*x+1/2*e)-1)*d^3-3/a/f*d^2/(tan(1/2*f*x+1/2*e)-1)*c+3/2/a/f*d^3/(tan(1/2*f*x+1/2*
e)-1)

________________________________________________________________________________________

Maxima [B]  time = 1.02283, size = 524, normalized size = 4.48 \begin{align*} -\frac{d^{3}{\left (\frac{2 \,{\left (\frac{\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - \frac{3 \, \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}\right )}}{a - \frac{2 \, a \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac{a \sin \left (f x + e\right )^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}}} - \frac{3 \, \log \left (\frac{\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right )}{a} + \frac{3 \, \log \left (\frac{\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - 1\right )}{a} + \frac{2 \, \sin \left (f x + e\right )}{a{\left (\cos \left (f x + e\right ) + 1\right )}}\right )} + 6 \, c d^{2}{\left (\frac{\log \left (\frac{\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right )}{a} - \frac{\log \left (\frac{\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - 1\right )}{a} - \frac{2 \, \sin \left (f x + e\right )}{{\left (a - \frac{a \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}}\right )}{\left (\cos \left (f x + e\right ) + 1\right )}} - \frac{\sin \left (f x + e\right )}{a{\left (\cos \left (f x + e\right ) + 1\right )}}\right )} - 6 \, c^{2} d{\left (\frac{\log \left (\frac{\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right )}{a} - \frac{\log \left (\frac{\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - 1\right )}{a} - \frac{\sin \left (f x + e\right )}{a{\left (\cos \left (f x + e\right ) + 1\right )}}\right )} - \frac{2 \, c^{3} \sin \left (f x + e\right )}{a{\left (\cos \left (f x + e\right ) + 1\right )}}}{2 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)*(c+d*sec(f*x+e))^3/(a+a*sec(f*x+e)),x, algorithm="maxima")

[Out]

-1/2*(d^3*(2*(sin(f*x + e)/(cos(f*x + e) + 1) - 3*sin(f*x + e)^3/(cos(f*x + e) + 1)^3)/(a - 2*a*sin(f*x + e)^2
/(cos(f*x + e) + 1)^2 + a*sin(f*x + e)^4/(cos(f*x + e) + 1)^4) - 3*log(sin(f*x + e)/(cos(f*x + e) + 1) + 1)/a
+ 3*log(sin(f*x + e)/(cos(f*x + e) + 1) - 1)/a + 2*sin(f*x + e)/(a*(cos(f*x + e) + 1))) + 6*c*d^2*(log(sin(f*x
 + e)/(cos(f*x + e) + 1) + 1)/a - log(sin(f*x + e)/(cos(f*x + e) + 1) - 1)/a - 2*sin(f*x + e)/((a - a*sin(f*x
+ e)^2/(cos(f*x + e) + 1)^2)*(cos(f*x + e) + 1)) - sin(f*x + e)/(a*(cos(f*x + e) + 1))) - 6*c^2*d*(log(sin(f*x
 + e)/(cos(f*x + e) + 1) + 1)/a - log(sin(f*x + e)/(cos(f*x + e) + 1) - 1)/a - sin(f*x + e)/(a*(cos(f*x + e) +
 1))) - 2*c^3*sin(f*x + e)/(a*(cos(f*x + e) + 1)))/f

________________________________________________________________________________________

Fricas [A]  time = 0.500271, size = 512, normalized size = 4.38 \begin{align*} \frac{3 \,{\left ({\left (2 \, c^{2} d - 2 \, c d^{2} + d^{3}\right )} \cos \left (f x + e\right )^{3} +{\left (2 \, c^{2} d - 2 \, c d^{2} + d^{3}\right )} \cos \left (f x + e\right )^{2}\right )} \log \left (\sin \left (f x + e\right ) + 1\right ) - 3 \,{\left ({\left (2 \, c^{2} d - 2 \, c d^{2} + d^{3}\right )} \cos \left (f x + e\right )^{3} +{\left (2 \, c^{2} d - 2 \, c d^{2} + d^{3}\right )} \cos \left (f x + e\right )^{2}\right )} \log \left (-\sin \left (f x + e\right ) + 1\right ) + 2 \,{\left (d^{3} + 2 \,{\left (c^{3} - 3 \, c^{2} d + 6 \, c d^{2} - 2 \, d^{3}\right )} \cos \left (f x + e\right )^{2} +{\left (6 \, c d^{2} - d^{3}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{4 \,{\left (a f \cos \left (f x + e\right )^{3} + a f \cos \left (f x + e\right )^{2}\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)*(c+d*sec(f*x+e))^3/(a+a*sec(f*x+e)),x, algorithm="fricas")

[Out]

1/4*(3*((2*c^2*d - 2*c*d^2 + d^3)*cos(f*x + e)^3 + (2*c^2*d - 2*c*d^2 + d^3)*cos(f*x + e)^2)*log(sin(f*x + e)
+ 1) - 3*((2*c^2*d - 2*c*d^2 + d^3)*cos(f*x + e)^3 + (2*c^2*d - 2*c*d^2 + d^3)*cos(f*x + e)^2)*log(-sin(f*x +
e) + 1) + 2*(d^3 + 2*(c^3 - 3*c^2*d + 6*c*d^2 - 2*d^3)*cos(f*x + e)^2 + (6*c*d^2 - d^3)*cos(f*x + e))*sin(f*x
+ e))/(a*f*cos(f*x + e)^3 + a*f*cos(f*x + e)^2)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \frac{\int \frac{c^{3} \sec{\left (e + f x \right )}}{\sec{\left (e + f x \right )} + 1}\, dx + \int \frac{d^{3} \sec ^{4}{\left (e + f x \right )}}{\sec{\left (e + f x \right )} + 1}\, dx + \int \frac{3 c d^{2} \sec ^{3}{\left (e + f x \right )}}{\sec{\left (e + f x \right )} + 1}\, dx + \int \frac{3 c^{2} d \sec ^{2}{\left (e + f x \right )}}{\sec{\left (e + f x \right )} + 1}\, dx}{a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)*(c+d*sec(f*x+e))**3/(a+a*sec(f*x+e)),x)

[Out]

(Integral(c**3*sec(e + f*x)/(sec(e + f*x) + 1), x) + Integral(d**3*sec(e + f*x)**4/(sec(e + f*x) + 1), x) + In
tegral(3*c*d**2*sec(e + f*x)**3/(sec(e + f*x) + 1), x) + Integral(3*c**2*d*sec(e + f*x)**2/(sec(e + f*x) + 1),
 x))/a

________________________________________________________________________________________

Giac [B]  time = 1.24518, size = 311, normalized size = 2.66 \begin{align*} \frac{\frac{3 \,{\left (2 \, c^{2} d - 2 \, c d^{2} + d^{3}\right )} \log \left ({\left | \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + 1 \right |}\right )}{a} - \frac{3 \,{\left (2 \, c^{2} d - 2 \, c d^{2} + d^{3}\right )} \log \left ({\left | \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 1 \right |}\right )}{a} + \frac{2 \,{\left (c^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 3 \, c^{2} d \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + 3 \, c d^{2} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - d^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )\right )}}{a} - \frac{2 \,{\left (6 \, c d^{2} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} - 3 \, d^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} - 6 \, c d^{2} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + d^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )\right )}}{{\left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} - 1\right )}^{2} a}}{2 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)*(c+d*sec(f*x+e))^3/(a+a*sec(f*x+e)),x, algorithm="giac")

[Out]

1/2*(3*(2*c^2*d - 2*c*d^2 + d^3)*log(abs(tan(1/2*f*x + 1/2*e) + 1))/a - 3*(2*c^2*d - 2*c*d^2 + d^3)*log(abs(ta
n(1/2*f*x + 1/2*e) - 1))/a + 2*(c^3*tan(1/2*f*x + 1/2*e) - 3*c^2*d*tan(1/2*f*x + 1/2*e) + 3*c*d^2*tan(1/2*f*x
+ 1/2*e) - d^3*tan(1/2*f*x + 1/2*e))/a - 2*(6*c*d^2*tan(1/2*f*x + 1/2*e)^3 - 3*d^3*tan(1/2*f*x + 1/2*e)^3 - 6*
c*d^2*tan(1/2*f*x + 1/2*e) + d^3*tan(1/2*f*x + 1/2*e))/((tan(1/2*f*x + 1/2*e)^2 - 1)^2*a))/f